import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)
// component: resolve => require(['@/view/forgetPasswd'], resolve),
export default new Router({
  routes: [
    {
      path: '*',
      redirect: '/index'
    },
    {
      path: '/index',
      name: 'index',
      component: resolve => require(['@/view/index'], resolve),
    },
    {
      path: '/info',
      name: 'info',
      component: resolve => require(['@/view/info'], resolve),
    },
    {
      path: '/register',
      name: 'register',
      component: resolve => require(['@/view/register'], resolve),
    },
    {
      path: '/login',
      name: 'login',
      component: resolve => require(['@/view/login'], resolve),
    },
    {
      path: '/list',
      name: 'list',
      component: resolve => require(['@/view/list'], resolve),
    },
    {
      path: '/search',
      name: 'search',
      component: resolve => require(['@/view/search'], resolve),
    },
    {
      path: '/shopList',
      name: 'shopList',
      component: resolve => require(['@/view/shop_list'], resolve),
    },
  ]
})
